-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add ability to use OIDC to report coverage #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for using an OIDC token when reporting coverage instead of a DSN.
- Define a new
use-oidcAction input and map it inmain.py - Append
--use-oidcto the CLI command whenuse_oidcis true - Simplify the CI-failure exit logic into a single conditional
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| main.py | Map use_oidc, append --use-oidc flag, and merge error logic |
| action.yml | Introduce use-oidc input with description and default value |
Comments suppressed due to low confidence (1)
main.py:58
- Add a unit or integration test to verify that the
--use-oidcflag is appended only whenuse_oidcis set to 'true'.
if input_data["use_oidc"] == "true":
Co-authored-by: Copilot <[email protected]> Signed-off-by: Srijan Saurav <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds the ability to report coverage using OIDC by introducing a new input parameter and updating the command-line arguments for the deepsource CLI execution.
- Added a new configuration key for OIDC in main.py
- Updated the CLI command to include a new flag when OIDC is enabled
- Introduced the "use-oidc" input in action.yml to configure this behavior
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| main.py | Added OIDC configuration and updated CLI command and error handling logic |
| action.yml | Added a new input for configuring the OIDC usage |
Comments suppressed due to low confidence (1)
main.py:14
- [nitpick] Consider using a consistent naming convention for environment variable keys; if underscores are preferred, consider renaming 'INPUT_USE-OIDC' to 'INPUT_USE_OIDC'.
"use_oidc": "INPUT_USE-OIDC",
| input_data["coverage_file"], | ||
| ] | ||
|
|
||
| if input_data["use_oidc"] == "true": |
Copilot
AI
May 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider converting the input value to a native boolean (e.g., using a lower case conversion or a boolean cast) to simplify condition checking and mitigate case sensitivity issues.
| if input_data["use_oidc"] == "true": | |
| if input_data["use_oidc"]: |
| required: false | ||
| default: ${{ github.event.pull_request.head.sha }} | ||
| use-oidc: | ||
| description: 'Use OIDC token instead of DSN. Allowed values are — true, false' |
Copilot
AI
May 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Clarify the 'use-oidc' input description by replacing the em dash with clear language (e.g. 'Allowed values: "true" or "false"').
|
A description about |
No description provided.